bitkeeper revision 1.774 (404f2922lDs3mYMJSQMNXaghfGVTFA)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Wed, 10 Mar 2004 14:41:38 +0000 (14:41 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Wed, 10 Mar 2004 14:41:38 +0000 (14:41 +0000)
config.h, hypervisor-if.h, Makefile:
  Cleanups.
hypervisor-if.h:
  Rename: xen/include/hypervisor-ifs/arch-x86_64/hypervisor-if-arch.h -> xen/include/hypervisor-ifs/arch-x86_64/hypervisor-if.h
  Rename: xen/include/hypervisor-ifs/arch-i386/hypervisor-if-arch.h -> xen/include/hypervisor-ifs/arch-i386/hypervisor-if.h
hypervisor-if-arch.h:
  mvdir

.rootkeys
Makefile
xen/Makefile
xen/include/asm-i386/config.h
xen/include/asm-x86_64/config.h
xen/include/hypervisor-ifs/arch-i386/hypervisor-if.h [new file with mode: 0644]
xen/include/hypervisor-ifs/arch-x86_64/hypervisor-if.h [new file with mode: 0644]
xen/include/hypervisor-ifs/hypervisor-if.h
xen/include/hypervisor-ifs/if-i386/hypervisor-if-arch.h [deleted file]
xen/include/hypervisor-ifs/if-x86_64/hypervisor-if-arch.h [deleted file]
xen/include/xeno/config.h

index 05d05306f7d5b4017a1b5aca673bf8a99cda9914..f077bc425569967ea60678500e398247d7d5f0b0 100644 (file)
--- a/.rootkeys
+++ b/.rootkeys
 404f1bc4tWkB9Qr8RkKtZGW5eMQzhw xen/include/asm-x86_64/uaccess.h
 404f1bc5idyWKKROGo_hvHVx58Gmkw xen/include/asm-x86_64/unaligned.h
 400304fcmRQmDdFYEzDh0wcBba9alg xen/include/hypervisor-ifs/COPYING
+404f1bc68SXxmv0zQpXBWGrCzSyp8w xen/include/hypervisor-ifs/arch-i386/hypervisor-if.h
+404f1bc7IwU-qnH8mJeVu0YsNGMrcw xen/include/hypervisor-ifs/arch-x86_64/hypervisor-if.h
 3ddb79c2YTaZwOqWin9-QNgHge5RVw xen/include/hypervisor-ifs/block.h
 3ddb79c2PMeWTK86y4C3F4MzHw4A1g xen/include/hypervisor-ifs/dom0_ops.h
 3e6377eaioRoNm0m_HSDEAd4Vqrq_w xen/include/hypervisor-ifs/dom_mem_ops.h
 403cd194j2pyLqXD8FJ-ukvZzkPenw xen/include/hypervisor-ifs/event_channel.h
 3ddb79c25UE59iu4JJcbRalx95mvcg xen/include/hypervisor-ifs/hypervisor-if.h
-404f1bc68SXxmv0zQpXBWGrCzSyp8w xen/include/hypervisor-ifs/if-i386/hypervisor-if-arch.h
-404f1bc7IwU-qnH8mJeVu0YsNGMrcw xen/include/hypervisor-ifs/if-x86_64/hypervisor-if-arch.h
 3ead095dE_VF-QA88rl_5cWYRWtRVQ xen/include/hypervisor-ifs/kbd.h
 3ddb79c2oRPrzClk3zbTkRHlpumzKA xen/include/hypervisor-ifs/network.h
 3f0d22cbroqp_BkoDPwkfRJhaw1LiQ xen/include/hypervisor-ifs/vbd.h
index f132263100c36a47d250dd06023b34d233b5d67f..bd7895a958025b6270e80523e7cd2831c338179e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -25,5 +25,3 @@ dist: all
 clean:
        $(MAKE) -C xen clean
        $(MAKE) -C tools clean
-
-       ln -sf if-$(ARCH) include/hypervisor-ifs/if-arch
index fc4bc7f96194da9800ffc73992c2a68aa78faf47..10399a63118ed80c3564805017c36f04688eb6d5 100644 (file)
@@ -45,10 +45,10 @@ $(TARGET): delete-unfresh-files make-links $(GENERATED_FILES)
 make-links: delete-links
        ln -sf xeno include/linux
        ln -sf asm-$(ARCH) include/asm
-       ln -sf if-$(ARCH) include/hypervisor-ifs/if-arch
+       ln -sf arch-$(ARCH) include/hypervisor-ifs/arch
 
 delete-links:
-       rm -f include/linux include/asm include/hypervisor-ifs/if-arch
+       rm -f include/linux include/asm include/hypervisor-ifs/arch
 
 # Blow away kernel.o because build info is stored statically within it.
 delete-unfresh-files:
index 436459cb455a18bfbe8bf7bc0104fbac10208315..3dd29864922c0e78b8cb697a8af80f59b0892434 100644 (file)
   SYMBOL_NAME_LABEL(name)
 #endif
 
-/* syslog levels ==> nothing! */
-#define KERN_NOTICE  ""
-#define KERN_WARNING ""
-#define KERN_DEBUG   ""
-#define KERN_INFO    ""
-#define KERN_ERR     ""
-#define KERN_CRIT    ""
-#define KERN_EMERG   ""
-#define KERN_ALERT   ""
-
 #define barrier() __asm__ __volatile__("": : :"memory")
 
 #define __HYPERVISOR_CS 0x0808
 
 #define NR_syscalls 256
 
-#define offsetof(_p,_f) ((unsigned long)&(((_p *)0)->_f))
-#define struct_cpy(_x,_y) (memcpy((_x),(_y),sizeof(*(_x))))
-
-#define dev_probe_lock() ((void)0)
-#define dev_probe_unlock() ((void)0)
-
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-
-#define capable(_c) 0
-
 #ifndef NDEBUG
-#define DPRINTK(_f, _a...) printk("(file=%s, line=%d) " _f, \
-                           __FILE__ , __LINE__ , ## _a )
 #define MEMORY_GUARD
 #define TRACE_BUFFER
-#else
-#define DPRINTK(_f, _a...) ((void)0)
 #endif
 
 #ifndef __ASSEMBLY__
-
-#include <xeno/compiler.h>
-
 extern unsigned long _end; /* standard ELF symbol */
 extern void __out_of_line_bug(int line) __attribute__((noreturn));
 #define out_of_line_bug() __out_of_line_bug(__LINE__)
-
-extern unsigned int opt_ser_baud;
-#define SERIAL_ENABLED (opt_ser_baud != 0)
-
 #endif /* __ASSEMBLY__ */
 
 #endif /* __XENO_I386_CONFIG_H__ */
index fe622e88a5cc74d8e1ee54a18a3a73f8e96d8f96..2fed6b79599b91e2be5939ebc097dcd7a5eb22b0 100644 (file)
   SYMBOL_NAME_LABEL(name)
 #endif
 
-/* syslog levels ==> nothing! */
-#define KERN_NOTICE  ""
-#define KERN_WARNING ""
-#define KERN_DEBUG   ""
-#define KERN_INFO    ""
-#define KERN_ERR     ""
-#define KERN_CRIT    ""
-#define KERN_EMERG   ""
-#define KERN_ALERT   ""
-
 #define barrier() __asm__ __volatile__("": : :"memory")
 
 /*
 
 #define NR_syscalls 256
 
-#define offsetof(_p,_f) ((unsigned long)&(((_p *)0)->_f))
-#define struct_cpy(_x,_y) (memcpy((_x),(_y),sizeof(*(_x))))
-
-#define dev_probe_lock() ((void)0)
-#define dev_probe_unlock() ((void)0)
-
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-
-#define capable(_c) 0
-
 #ifndef NDEBUG
-#define DPRINTK(_f, _a...) printk("(file=%s, line=%d) " _f, \
-                           __FILE__ , __LINE__ , ## _a )
 #define MEMORY_GUARD
 #define TRACE_BUFFER
-#else
-#define DPRINTK(_f, _a...) ((void)0)
 #endif
 
 #ifndef __ASSEMBLY__
-
-#include <xeno/compiler.h>
-
 extern unsigned long _end; /* standard ELF symbol */
 extern void __out_of_line_bug(int line) __attribute__((noreturn));
 #define out_of_line_bug() __out_of_line_bug(__LINE__)
-
-extern unsigned int opt_ser_baud;
-#define SERIAL_ENABLED (opt_ser_baud != 0)
-
 #endif /* __ASSEMBLY__ */
 
 #endif /* __XENO_X86_64_CONFIG_H__ */
diff --git a/xen/include/hypervisor-ifs/arch-i386/hypervisor-if.h b/xen/include/hypervisor-ifs/arch-i386/hypervisor-if.h
new file mode 100644 (file)
index 0000000..fefc24a
--- /dev/null
@@ -0,0 +1,122 @@
+/******************************************************************************
+ * arch-i386/hypervisor-if.h
+ * 
+ * Interface to x86 32-bit Xeno hypervisor.
+ */
+
+#ifndef __HYPERVISOR_IF_I386_H__
+#define __HYPERVISOR_IF_I386_H__
+
+/*
+ * SEGMENT DESCRIPTOR TABLES
+ */
+/*
+ * A number of GDT entries are reserved by Xen. These are not situated at the
+ * start of the GDT because some stupid OSes export hard-coded selector values
+ * in their ABI. These hard-coded values are always near the start of the GDT,
+ * so Xen places itself out of the way.
+ * 
+ * NB. The reserved range is inclusive (that is, both FIRST_RESERVED_GDT_ENTRY
+ * and LAST_RESERVED_GDT_ENTRY are reserved).
+ */
+#define NR_RESERVED_GDT_ENTRIES    40
+#define FIRST_RESERVED_GDT_ENTRY   256
+#define LAST_RESERVED_GDT_ENTRY    \
+  (FIRST_RESERVED_GDT_ENTRY + NR_RESERVED_GDT_ENTRIES - 1)
+
+
+/*
+ * These flat segments are in the Xen-private section of every GDT. Since these
+ * are also present in the initial GDT, many OSes will be able to avoid
+ * installing their own GDT.
+ */
+#define FLAT_RING1_CS 0x0819    /* GDT index 259 */
+#define FLAT_RING1_DS 0x0821    /* GDT index 260 */
+#define FLAT_RING3_CS 0x082b    /* GDT index 261 */
+#define FLAT_RING3_DS 0x0833    /* GDT index 262 */
+
+/* And the trap vector is... */
+#define TRAP_INSTR "int $0x82"
+
+
+/*
+ * Virtual addresses beyond this are not modifiable by guest OSes. The 
+ * machine->physical mapping table starts at this address, read-only.
+ */
+#define HYPERVISOR_VIRT_START (0xFC000000UL)
+#ifndef machine_to_phys_mapping
+#define machine_to_phys_mapping ((unsigned long *)HYPERVISOR_VIRT_START)
+#endif
+
+#ifndef __ASSEMBLY__
+
+/*
+ * Send an array of these to HYPERVISOR_set_trap_table()
+ */
+#define TI_GET_DPL(_ti)      ((_ti)->flags & 3)
+#define TI_GET_IF(_ti)       ((_ti)->flags & 4)
+#define TI_SET_DPL(_ti,_dpl) ((_ti)->flags |= (_dpl))
+#define TI_SET_IF(_ti,_if)   ((_ti)->flags |= ((!!(_if))<<2))
+typedef struct trap_info_st
+{
+    unsigned char  vector;  /* exception vector                              */
+    unsigned char  flags;   /* 0-3: privilege level; 4: clear event enable?  */
+    unsigned short cs;     /* code selector                                 */
+    unsigned long  address; /* code address                                  */
+} trap_info_t;
+
+typedef struct
+{
+    unsigned long ebx;
+    unsigned long ecx;
+    unsigned long edx;
+    unsigned long esi;
+    unsigned long edi;
+    unsigned long ebp;
+    unsigned long eax;
+    unsigned long ds;
+    unsigned long es;
+    unsigned long fs;
+    unsigned long gs;
+    unsigned long _unused;
+    unsigned long eip;
+    unsigned long cs;
+    unsigned long eflags;
+    unsigned long esp;
+    unsigned long ss;
+} execution_context_t;
+
+/*
+ * Shared info specific to the architecture in question
+ */
+typedef struct arch_shared_info_st {
+    unsigned int       rdtsc_bitshift;  /* tsc_timestamp uses N:N+31 of TSC. */
+} arch_shared_info_t;
+
+
+/*
+ * The following is all CPU context. Note that the i387_ctxt block is filled 
+ * in by FXSAVE if the CPU has feature FXSR; otherwise FSAVE is used.
+ */
+typedef struct full_execution_context_st
+{
+#define ECF_I387_VALID (1<<0)
+    unsigned long flags;
+    execution_context_t i386_ctxt;          /* User-level CPU registers     */
+    char          i387_ctxt[256];           /* User-level FPU registers     */
+    trap_info_t   trap_ctxt[256];           /* Virtual IDT                  */
+    unsigned int  fast_trap_idx;            /* "Fast trap" vector offset    */
+    unsigned long ldt_base, ldt_ents;       /* LDT (linear address, # ents) */
+    unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */
+    unsigned long ring1_ss, ring1_esp;      /* Virtual TSS (only SS1/ESP1)  */
+    unsigned long pt_base;                  /* CR3 (pagetable base)         */
+    unsigned long debugreg[8];              /* DB0-DB7 (debug registers)    */
+    unsigned long event_callback_cs;        /* CS:EIP of event callback     */
+    unsigned long event_callback_eip;
+    unsigned long failsafe_callback_cs;     /* CS:EIP of failsafe callback  */
+    unsigned long failsafe_callback_eip;
+} full_execution_context_t;
+
+#endif
+
+#endif
diff --git a/xen/include/hypervisor-ifs/arch-x86_64/hypervisor-if.h b/xen/include/hypervisor-ifs/arch-x86_64/hypervisor-if.h
new file mode 100644 (file)
index 0000000..53354f9
--- /dev/null
@@ -0,0 +1,122 @@
+/******************************************************************************
+ * arch-x86_64/hypervisor-if.h
+ * 
+ * Interface to AMD x86-64 bit Xeno hypervisor.
+ */
+
+#ifndef __HYPERVISOR_IF_X86_64_H__
+#define __HYPERVISOR_IF_X86_64_H__
+
+/*
+ * SEGMENT DESCRIPTOR TABLES
+ */
+/*
+ * A number of GDT entries are reserved by Xen. These are not situated at the
+ * start of the GDT because some stupid OSes export hard-coded selector values
+ * in their ABI. These hard-coded values are always near the start of the GDT,
+ * so Xen places itself out of the way.
+ * 
+ * NB. The reserved range is inclusive (that is, both FIRST_RESERVED_GDT_ENTRY
+ * and LAST_RESERVED_GDT_ENTRY are reserved).
+ */
+#define NR_RESERVED_GDT_ENTRIES    40 
+#define FIRST_RESERVED_GDT_ENTRY   256
+#define LAST_RESERVED_GDT_ENTRY    \
+  (FIRST_RESERVED_GDT_ENTRY + NR_RESERVED_GDT_ENTRIES - 1)
+
+/*
+ * 64-bit segment selectors
+ * These flat segments are in the Xen-private section of every GDT. Since these
+ * are also present in the initial GDT, many OSes will be able to avoid
+ * installing their own GDT.
+ */
+
+#define FLAT_RING3_CS32 0x0823 /* GDT index 260 */
+#define FLAT_RING3_CS64 0x082b /* GDT index 261 */
+#define FLAT_RING3_DS 0x0833   /* GDT index 262 */
+
+
+/* And the trap vector is... */
+#define TRAP_INSTR "syscall"
+
+
+#ifndef machine_to_phys_mapping
+#define machine_to_phys_mapping ((unsigned long *)HYPERVISOR_VIRT_START)
+#endif
+
+#ifndef __ASSEMBLY__
+
+/*
+ * Send an array of these to HYPERVISOR_set_trap_table()
+ */
+#define TI_GET_DPL(_ti)      ((_ti)->flags & 3)
+#define TI_GET_IF(_ti)       ((_ti)->flags & 4)
+#define TI_SET_DPL(_ti,_dpl) ((_ti)->flags |= (_dpl))
+#define TI_SET_IF(_ti,_if)   ((_ti)->flags |= ((!!(_if))<<2))
+typedef struct trap_info_st
+{
+    unsigned char  vector;  /* exception vector                              */
+    unsigned char  flags;   /* 0-3: privilege level; 4: clear event enable?  */
+    unsigned short cs;     /* code selector                                 */
+    unsigned long  address; /* code address                                  */
+} trap_info_t;
+
+typedef struct
+{
+    unsigned long r15;
+    unsigned long r14;
+    unsigned long r13;
+    unsigned long r12;
+    unsigned long rbp;
+    unsigned long rbx;
+    unsigned long r11;
+    unsigned long r10;
+    unsigned long r9;
+    unsigned long r8;
+    unsigned long rax;
+    unsigned long rcx;
+    unsigned long rdx;
+    unsigned long rsi;
+    unsigned long rdi;
+    unsigned long rip;
+    unsigned long cs;
+    unsigned long eflags;
+    unsigned long rsp;
+    unsigned long ss;
+} execution_context_t;
+
+/*
+ * Xen/guestos shared data -- pointer provided in start_info.
+ * NB. We expect that this struct is smaller than a page.
+ */
+typedef struct arch_shared_info_st {
+    unsigned int       rdtsc_bitshift;  /* tsc_timestamp uses N:N+31 of TSC. */
+} arch_shared_info_t;
+
+
+/*
+ * The following is all CPU context. Note that the i387_ctxt block is filled 
+ * in by FXSAVE if the CPU has feature FXSR; otherwise FSAVE is used.
+ */
+typedef struct full_execution_context_st
+{
+#define ECF_I387_VALID (1<<0)
+    unsigned long flags;
+    execution_context_t x86_64_ctxt;          /* User-level CPU registers     */
+    char          i387_ctxt[512];           /* User-level FPU registers     */
+    trap_info_t   trap_ctxt[256];           /* Virtual IDT                  */
+    unsigned int  fast_trap_idx;            /* "Fast trap" vector offset    */
+    unsigned long ldt_base, ldt_ents;       /* LDT (linear address, # ents) */
+    unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */
+    unsigned long ring1_ss, ring1_esp;      /* Virtual TSS (only SS1/ESP1)  */
+    unsigned long pt_base;                  /* CR3 (pagetable base)         */
+    unsigned long debugreg[8];              /* DB0-DB7 (debug registers)    */
+    unsigned long event_callback_cs;        /* CS:EIP of event callback     */
+    unsigned long event_callback_eip;
+    unsigned long failsafe_callback_cs;     /* CS:EIP of failsafe callback  */
+    unsigned long failsafe_callback_eip;
+} full_execution_context_t;
+
+#endif /* !__ASSEMBLY__ */
+
+#endif /* __HYPERVISOR_IF_H__ */
index bf61d7c932290f8d676f47c8ba17e01e36d49bde..2d708a5a4f43d643a0040fc52b6c5fe9b713a468 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef __HYPERVISOR_IF_H__
 #define __HYPERVISOR_IF_H__
 
-#include "if-arch/hypervisor-if-arch.h"
+#include "arch/hypervisor-if.h"
 
 /*
  * HYPERVISOR "SYSTEM CALLS"
diff --git a/xen/include/hypervisor-ifs/if-i386/hypervisor-if-arch.h b/xen/include/hypervisor-ifs/if-i386/hypervisor-if-arch.h
deleted file mode 100644 (file)
index e0e6594..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-/******************************************************************************
- * hypervisor-if-i386.h
- * 
- * i386 32-bit Interface to Xeno hypervisor.
- */
-
-#ifndef __HYPERVISOR_IF_I386_H__
-#define __HYPERVISOR_IF_I386_H__
-
-/*
- * SEGMENT DESCRIPTOR TABLES
- */
-/*
- * A number of GDT entries are reserved by Xen. These are not situated at the
- * start of the GDT because some stupid OSes export hard-coded selector values
- * in their ABI. These hard-coded values are always near the start of the GDT,
- * so Xen places itself out of the way.
- * 
- * NB. The reserved range is inclusive (that is, both FIRST_RESERVED_GDT_ENTRY
- * and LAST_RESERVED_GDT_ENTRY are reserved).
- */
-#define NR_RESERVED_GDT_ENTRIES    40
-#define FIRST_RESERVED_GDT_ENTRY   256
-#define LAST_RESERVED_GDT_ENTRY    \
-  (FIRST_RESERVED_GDT_ENTRY + NR_RESERVED_GDT_ENTRIES - 1)
-
-
-/*
- * These flat segments are in the Xen-private section of every GDT. Since these
- * are also present in the initial GDT, many OSes will be able to avoid
- * installing their own GDT.
- */
-#define FLAT_RING1_CS 0x0819    /* GDT index 259 */
-#define FLAT_RING1_DS 0x0821    /* GDT index 260 */
-#define FLAT_RING3_CS 0x082b    /* GDT index 261 */
-#define FLAT_RING3_DS 0x0833    /* GDT index 262 */
-
-/* And the trap vector is... */
-#define TRAP_INSTR "int $0x82"
-
-
-/*
- * Virtual addresses beyond this are not modifiable by guest OSes. The 
- * machine->physical mapping table starts at this address, read-only.
- */
-#define HYPERVISOR_VIRT_START (0xFC000000UL)
-#ifndef machine_to_phys_mapping
-#define machine_to_phys_mapping ((unsigned long *)HYPERVISOR_VIRT_START)
-#endif
-
-#ifndef __ASSEMBLY__
-
-/*
- * Send an array of these to HYPERVISOR_set_trap_table()
- */
-#define TI_GET_DPL(_ti)      ((_ti)->flags & 3)
-#define TI_GET_IF(_ti)       ((_ti)->flags & 4)
-#define TI_SET_DPL(_ti,_dpl) ((_ti)->flags |= (_dpl))
-#define TI_SET_IF(_ti,_if)   ((_ti)->flags |= ((!!(_if))<<2))
-typedef struct trap_info_st
-{
-    unsigned char  vector;  /* exception vector                              */
-    unsigned char  flags;   /* 0-3: privilege level; 4: clear event enable?  */
-    unsigned short cs;     /* code selector                                 */
-    unsigned long  address; /* code address                                  */
-} trap_info_t;
-
-typedef struct
-{
-    unsigned long ebx;
-    unsigned long ecx;
-    unsigned long edx;
-    unsigned long esi;
-    unsigned long edi;
-    unsigned long ebp;
-    unsigned long eax;
-    unsigned long ds;
-    unsigned long es;
-    unsigned long fs;
-    unsigned long gs;
-    unsigned long _unused;
-    unsigned long eip;
-    unsigned long cs;
-    unsigned long eflags;
-    unsigned long esp;
-    unsigned long ss;
-} execution_context_t;
-
-/*
- * Shared info specific to the architecture in question
- */
-typedef struct arch_shared_info_st {
-    unsigned int       rdtsc_bitshift;  /* tsc_timestamp uses N:N+31 of TSC. */
-} arch_shared_info_t;
-
-
-/*
- * The following is all CPU context. Note that the i387_ctxt block is filled 
- * in by FXSAVE if the CPU has feature FXSR; otherwise FSAVE is used.
- */
-typedef struct full_execution_context_st
-{
-#define ECF_I387_VALID (1<<0)
-    unsigned long flags;
-    execution_context_t i386_ctxt;          /* User-level CPU registers     */
-    char          i387_ctxt[256];           /* User-level FPU registers     */
-    trap_info_t   trap_ctxt[256];           /* Virtual IDT                  */
-    unsigned int  fast_trap_idx;            /* "Fast trap" vector offset    */
-    unsigned long ldt_base, ldt_ents;       /* LDT (linear address, # ents) */
-    unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */
-    unsigned long ring1_ss, ring1_esp;      /* Virtual TSS (only SS1/ESP1)  */
-    unsigned long pt_base;                  /* CR3 (pagetable base)         */
-    unsigned long debugreg[8];              /* DB0-DB7 (debug registers)    */
-    unsigned long event_callback_cs;        /* CS:EIP of event callback     */
-    unsigned long event_callback_eip;
-    unsigned long failsafe_callback_cs;     /* CS:EIP of failsafe callback  */
-    unsigned long failsafe_callback_eip;
-} full_execution_context_t;
-
-#endif
-
-#endif
diff --git a/xen/include/hypervisor-ifs/if-x86_64/hypervisor-if-arch.h b/xen/include/hypervisor-ifs/if-x86_64/hypervisor-if-arch.h
deleted file mode 100644 (file)
index 7aa676d..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-/******************************************************************************
- * hypervisor-if.h
- * 
- * Interface to AMD x86-64 bit Xeno hypervisor.
- */
-
-#ifndef __HYPERVISOR_IF_X86_64_H__
-#define __HYPERVISOR_IF_X86_64_H__
-
-/*
- * SEGMENT DESCRIPTOR TABLES
- */
-/*
- * A number of GDT entries are reserved by Xen. These are not situated at the
- * start of the GDT because some stupid OSes export hard-coded selector values
- * in their ABI. These hard-coded values are always near the start of the GDT,
- * so Xen places itself out of the way.
- * 
- * NB. The reserved range is inclusive (that is, both FIRST_RESERVED_GDT_ENTRY
- * and LAST_RESERVED_GDT_ENTRY are reserved).
- */
-#define NR_RESERVED_GDT_ENTRIES    40 
-#define FIRST_RESERVED_GDT_ENTRY   256
-#define LAST_RESERVED_GDT_ENTRY    \
-  (FIRST_RESERVED_GDT_ENTRY + NR_RESERVED_GDT_ENTRIES - 1)
-
-/*
- * 64-bit segment selectors
- * These flat segments are in the Xen-private section of every GDT. Since these
- * are also present in the initial GDT, many OSes will be able to avoid
- * installing their own GDT.
- */
-
-#define FLAT_RING3_CS32 0x0823 /* GDT index 260 */
-#define FLAT_RING3_CS64 0x082b /* GDT index 261 */
-#define FLAT_RING3_DS 0x0833   /* GDT index 262 */
-
-
-/* And the trap vector is... */
-#define TRAP_INSTR "syscall"
-
-
-#ifndef machine_to_phys_mapping
-#define machine_to_phys_mapping ((unsigned long *)HYPERVISOR_VIRT_START)
-#endif
-
-#ifndef __ASSEMBLY__
-
-/*
- * Send an array of these to HYPERVISOR_set_trap_table()
- */
-#define TI_GET_DPL(_ti)      ((_ti)->flags & 3)
-#define TI_GET_IF(_ti)       ((_ti)->flags & 4)
-#define TI_SET_DPL(_ti,_dpl) ((_ti)->flags |= (_dpl))
-#define TI_SET_IF(_ti,_if)   ((_ti)->flags |= ((!!(_if))<<2))
-typedef struct trap_info_st
-{
-    unsigned char  vector;  /* exception vector                              */
-    unsigned char  flags;   /* 0-3: privilege level; 4: clear event enable?  */
-    unsigned short cs;     /* code selector                                 */
-    unsigned long  address; /* code address                                  */
-} trap_info_t;
-
-typedef struct
-{
-    unsigned long r15;
-    unsigned long r14;
-    unsigned long r13;
-    unsigned long r12;
-    unsigned long rbp;
-    unsigned long rbx;
-    unsigned long r11;
-    unsigned long r10;
-    unsigned long r9;
-    unsigned long r8;
-    unsigned long rax;
-    unsigned long rcx;
-    unsigned long rdx;
-    unsigned long rsi;
-    unsigned long rdi;
-    unsigned long rip;
-    unsigned long cs;
-    unsigned long eflags;
-    unsigned long rsp;
-    unsigned long ss;
-} execution_context_t;
-
-/*
- * Xen/guestos shared data -- pointer provided in start_info.
- * NB. We expect that this struct is smaller than a page.
- */
-typedef struct arch_shared_info_st {
-    unsigned int       rdtsc_bitshift;  /* tsc_timestamp uses N:N+31 of TSC. */
-} arch_shared_info_t;
-
-
-/*
- * The following is all CPU context. Note that the i387_ctxt block is filled 
- * in by FXSAVE if the CPU has feature FXSR; otherwise FSAVE is used.
- */
-typedef struct full_execution_context_st
-{
-#define ECF_I387_VALID (1<<0)
-    unsigned long flags;
-    execution_context_t x86_64_ctxt;          /* User-level CPU registers     */
-    char          i387_ctxt[512];           /* User-level FPU registers     */
-    trap_info_t   trap_ctxt[256];           /* Virtual IDT                  */
-    unsigned int  fast_trap_idx;            /* "Fast trap" vector offset    */
-    unsigned long ldt_base, ldt_ents;       /* LDT (linear address, # ents) */
-    unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */
-    unsigned long ring1_ss, ring1_esp;      /* Virtual TSS (only SS1/ESP1)  */
-    unsigned long pt_base;                  /* CR3 (pagetable base)         */
-    unsigned long debugreg[8];              /* DB0-DB7 (debug registers)    */
-    unsigned long event_callback_cs;        /* CS:EIP of event callback     */
-    unsigned long event_callback_eip;
-    unsigned long failsafe_callback_cs;     /* CS:EIP of failsafe callback  */
-    unsigned long failsafe_callback_eip;
-} full_execution_context_t;
-
-#endif /* !__ASSEMBLY__ */
-
-#endif /* __HYPERVISOR_IF_H__ */
index 88a1186f25f197ab457a9066c8401ef1abefcd59..2fd3b19d20a1f9bc8396313f85809ec1e119d333 100644 (file)
@@ -6,6 +6,40 @@
 
 #ifndef __XENO_CONFIG_H__
 #define __XENO_CONFIG_H__
+
 #include <asm/config.h>
 
+/* syslog levels ==> nothing! */
+#define KERN_NOTICE  ""
+#define KERN_WARNING ""
+#define KERN_DEBUG   ""
+#define KERN_INFO    ""
+#define KERN_ERR     ""
+#define KERN_CRIT    ""
+#define KERN_EMERG   ""
+#define KERN_ALERT   ""
+
+#define offsetof(_p,_f) ((unsigned long)&(((_p *)0)->_f))
+#define struct_cpy(_x,_y) (memcpy((_x),(_y),sizeof(*(_x))))
+
+#define dev_probe_lock() ((void)0)
+#define dev_probe_unlock() ((void)0)
+
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+
+#define capable(_c) 0
+
+#ifndef NDEBUG
+#define DPRINTK(_f, _a...) printk("(file=%s, line=%d) " _f, \
+                           __FILE__ , __LINE__ , ## _a )
+#else
+#define DPRINTK(_f, _a...) ((void)0)
+#endif
+
+#ifndef __ASSEMBLY__
+#include <xeno/compiler.h>
+extern unsigned int opt_ser_baud;
+#define SERIAL_ENABLED (opt_ser_baud != 0)
+#endif
+
 #endif /* __XENO_CONFIG_H__ */